<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
	xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
	layout:decorate="~{layout}">
<head>
<title>Users : Create</title>
</head>
<body>
	<h1 layout:fragment="header">Users : Create</h1>
	<div layout:fragment="content" class="container">
		<form id="userForm" th:action="@{/user/(form)}" th:object="${user}"
			action="#" method="post">
			<div th:if="${#fields.hasErrors('*')}" class="alert alert-error">
				<p th:each="error : ${#fields.errors('*')}" th:text="${error}">
					Validation error</p>
			</div>
			<div class="pull-right">
				<a th:href="@{/}" href="users.html"> Users </a>
			</div>
			<input type="hidden" th:field="*{id}"
				th:class="${#fields.hasErrors('id')} ? 'field-error'" /> <label
				for="username">Username</label> <input type="text"
				th:field="*{username}"
				th:class="${#fields.hasErrors('username')} ? 'field-error'" /> <label
				for="email">Email</label>
			<input type="email" th:field="*{email}"
				th:class="${#fields.hasErrors('email')} ? 'field-error'"/>
			<div class="form-actions">
				<input type="submit" value="Save" />
			</div>
		</form>
	</div>
</body>
</html>
